<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>junglego: brain.hpp Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">junglego
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">brain.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="brain_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef BRAIN_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define BRAIN_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="types_8hpp.html">types.hpp</a>&quot;</span>
<a name="l00005"></a>00005 <span class="keyword">class </span><a class="code" href="class_neuron.html">Neuron</a>;
<a name="l00006"></a>00006 
<a name="l00007"></a><a class="code" href="class_brain.html">00007</a> <span class="keyword">class </span><a class="code" href="class_brain.html">Brain</a> {
<a name="l00008"></a><a class="code" href="class_brain.html#a7b3aaa3307a7cee8d2e4016abb2dab33">00008</a>     <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="class_brain.html#a7b3aaa3307a7cee8d2e4016abb2dab33">m_nInputs</a>;
<a name="l00009"></a><a class="code" href="class_brain.html#a5976362424298953361cba95b77d97b5">00009</a>     <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="class_brain.html#a5976362424298953361cba95b77d97b5">m_nNeurons</a>;
<a name="l00010"></a><a class="code" href="class_brain.html#ac8b6cce7f7364dfdff5911f68f0ad408">00010</a>     <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="class_brain.html#ac8b6cce7f7364dfdff5911f68f0ad408">m_nNeuronsPerLayer</a>;
<a name="l00011"></a><a class="code" href="class_brain.html#a12ff1fd3e4fb46215445be3ae66ccd83">00011</a>     <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="class_brain.html#a12ff1fd3e4fb46215445be3ae66ccd83">m_nOutputs</a>;
<a name="l00012"></a><a class="code" href="class_brain.html#aaf3927cee92321395516852abb5e6395">00012</a>     <a class="code" href="class_neuron.html">Neuron</a> * <a class="code" href="class_brain.html#aaf3927cee92321395516852abb5e6395">m_inputNeurons</a>;
<a name="l00013"></a><a class="code" href="class_brain.html#aee2b8a0d3ef18e474253f7f3f2cf3377">00013</a>     <a class="code" href="class_neuron.html">Neuron</a> * <a class="code" href="class_brain.html#aee2b8a0d3ef18e474253f7f3f2cf3377">m_bodyNeurons</a>;
<a name="l00014"></a><a class="code" href="class_brain.html#a0c3cbbb061c0608005265d71fdab6176">00014</a>     <a class="code" href="class_neuron.html">Neuron</a> * <a class="code" href="class_brain.html#a0c3cbbb061c0608005265d71fdab6176">m_outputNeurons</a>;
<a name="l00015"></a>00015 <span class="keyword">public</span>:
<a name="l00016"></a>00016     <a class="code" href="class_brain.html#a92daf9737361454abbb5988a89b7ff40">Brain</a> ();
<a name="l00017"></a>00017     <a class="code" href="class_brain.html#a92daf9737361454abbb5988a89b7ff40">Brain</a> (<a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> nInputs, <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> nNeuronsPerLayer, <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> nLayers, <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> nOutputs );
<a name="l00018"></a>00018     <a class="code" href="class_brain.html#af41db0fbf20565d17d36bad299ae0cac">~Brain</a>();
<a name="l00019"></a>00019     <span class="keywordtype">void</span> <a class="code" href="class_brain.html#ac80876d3cd168b2f638c49d03787ff22">compute</a>(<span class="keywordtype">float</span> * inputs, <span class="keywordtype">float</span> * outputs);
<a name="l00020"></a>00020     <span class="keywordtype">int</span> <a class="code" href="class_brain.html#a843fd88f56948142b1934d25f8d16089">copy</a> (<a class="code" href="class_brain.html">Brain</a> * source);
<a name="l00021"></a>00021     <span class="keywordtype">void</span> <a class="code" href="class_brain.html#a8d9c671760b41bd018b368fed8de928e">mutate</a> (<span class="keywordtype">int</span> rate);
<a name="l00022"></a>00022     <span class="keywordtype">void</span> <a class="code" href="class_brain.html#acf2c5a7b3a26c74236c14207b995bfe2">crossover</a> (<a class="code" href="class_brain.html">Brain</a> * parent1, <a class="code" href="class_brain.html">Brain</a> * parent2);
<a name="l00023"></a>00023     <span class="keywordtype">void</span> <a class="code" href="class_brain.html#a6127669e8f3abf0b0c0701b4c8ccca89">saveBrain</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * filename);
<a name="l00024"></a>00024     <span class="keywordtype">void</span> <a class="code" href="class_brain.html#ae8e1470ecdf8b573f2c04fd45ff65560">loadBrain</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * filename);
<a name="l00025"></a>00025 };
<a name="l00026"></a>00026 <span class="preprocessor">#endif</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 20 2012 21:57:14 for junglego by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
